<!--# layout("/common/layout.html",{"jsBase":"/js/base/baseSuggest/"}){ -->
<style>
    div {
        float: left;
        margin:10px;
    }
</style>
<div id="layer-photos-demo">
    <!--#  for(img in imgs){ -->
            <div ><img src="${img}" width="300" height="500" onclick="openImg(this.src)"></div>
    <!--#}-->
</div>
<!--#} -->

<script>
layui.extend({
    loading: '../../../plugins/layui_extends/loading/loading',
}).define([ 'form', 'laydate', 'table','loading','baseSuggestApi'], function(exports) {
    window.openImg =function(img) {
        var winHeight = $(window).height() - 80;  // 浏览器可视部分高度
        var winWidth = $(window).width() - 100;  // 浏览器可视部分宽度
        var imgHtml = "<img src='" + img+ "' width='"+(winWidth-20)+"px' />";
        // var imgHtml = "<img src='http://wx2.sinaimg.cn/orj360/92c91978gy1gel2bwaymuj20ku26swpw.jpg' width='600px'/>";
        // 捕获页
        layer.open({
            type: 1,
            shade: false,
            shade: 0.8,
            offset: 'auto',
            shadeClose:true,
            scrollbar: false,
            skin:'layui-layer-nobg',
            title: false, //不显示标题
            area:[winWidth+'px',winHeight+'px'],
            // area: [600+'px', 600+'px'],
            content: imgHtml, //捕获的元素，注意：最好该指定的元素要存放在body最外层，否则可能被其它的相对元素所影响
            cancel: function () {
                //layer.msg('捕获就是从页面已经存在的元素上，包裹layer的结构', { time: 5000, icon: 6 });
            }
        });
    }

});
</script>
